home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / var / lib / dpkg / info / python-sip4.prerm < prev    next >
Encoding:
Text File  |  2007-02-19  |  816 b   |  29 lines

  1. #!/bin/sh
  2. set -e
  3. # Automatically added by dh_pycentral
  4. if which python >/dev/null 2>&1 && which pycentral >/dev/null 2>&1; then
  5.     pycentral pkgremove python-sip4
  6. else
  7.     flist=$(tempfile)
  8.     find /usr/share/pycentral/python-sip4 -depth -mindepth 2 \
  9.       \( -name '*.py' -printf 'p %P\n' -o -printf '%y %P\n' \) \
  10.       > $flist 2>/dev/null || true
  11.     if [ -s $flist ]; then
  12.         for d in /usr/lib/python[0-9].[0-9]; do
  13.         case "$d" in */python2.1|*/python2.2) continue; esac
  14.         while read t n; do
  15.             case "$t" in
  16.             p) rm -f $d/$n $d/${n}[co];;
  17.             d) rmdir $d/$n 2>/dev/null || true;;
  18.             *) rm -f $d/$n
  19.             esac
  20.         done < $flist
  21.         done
  22.     fi
  23.     rm -f $flist
  24.     dpkg -L python-sip4 \
  25.             | awk '/\/usr\/share\/pycentral/ {next} /\.py$/ {print $0"c\n" $0"o"}' \
  26.         | xargs rm -f >&2
  27. fi
  28. # End automatically added section
  29.